package cn.gson.school.entity.caiwu;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import cn.gson.school.entity.jiaoxue.ClassEntity;
import cn.gson.school.entity.jiaoxue.StudentEntity;
import cn.gson.school.entity.xitong.ImageEntity;
/**
 * 收款表
 * @author lc
 *
 */
@Entity
@Table(name = "tb_shoukuan")
public class ShouKuanEntity {
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "shoukuan_id")
	private Long shoukuanId;//收款记录编号
	
	@ManyToOne
	@JoinColumn(name = "studentInfo_id")
	private StudentEntity student;//学生详情编号
	
	//
	@ManyToOne
	@JoinColumn(name = "shoukuaninfo_id")
	private ShouKuanInfoEntity shoukuaninfoId;//收款详情编号

	@ManyToOne
	@JoinColumn(name = "class_id")
	private ClassEntity classId;//班级编号
	
	//添加了一个图片表外键
	@OneToOne
	@JoinColumn(name = "images_id")
	private ImageEntity imagesId;
	
	//=========================
	@Column(name = "shouKuan_name")
	private String shouKuanName;//收款项目
	
	@Column(name = "shouKuan_money")
	private Double shouKuanMoney;//收款金额
	
	@Column(name = "shouKuan_pay")
	private String shouKuanPay;//支付方式
	//优惠金额是double
	@Column(name = "discount_money")
	private Double discountMoney;//优惠金额
	
	@Column(name = "discount_reason")
	private String discountReason;//优惠原因
	
	private Integer lend;//是否贷款

	public Long getShoukuanId() {
		return shoukuanId;
	}

	public void setShoukuanId(Long shoukuanId) {
		this.shoukuanId = shoukuanId;
	}

	public StudentEntity getStudent() {
		return student;
	}

	public void setStudent(StudentEntity student) {
		this.student = student;
	}

	public ShouKuanInfoEntity getShoukuaninfoId() {
		return shoukuaninfoId;
	}

	public void setShoukuaninfoId(ShouKuanInfoEntity shoukuaninfoId) {
		this.shoukuaninfoId = shoukuaninfoId;
	}

	public ClassEntity getClassId() {
		return classId;
	}

	public void setClassId(ClassEntity classId) {
		this.classId = classId;
	}

	public ImageEntity getImagesId() {
		return imagesId;
	}

	public void setImagesId(ImageEntity imagesId) {
		this.imagesId = imagesId;
	}

	public String getShouKuanName() {
		return shouKuanName;
	}

	public void setShouKuanName(String shouKuanName) {
		this.shouKuanName = shouKuanName;
	}

	public Double getShouKuanMoney() {
		return shouKuanMoney;
	}

	public void setShouKuanMoney(Double shouKuanMoney) {
		this.shouKuanMoney = shouKuanMoney;
	}

	public String getShouKuanPay() {
		return shouKuanPay;
	}

	public void setShouKuanPay(String shouKuanPay) {
		this.shouKuanPay = shouKuanPay;
	}

	public Double getDiscountMoney() {
		return discountMoney;
	}

	public void setDiscountMoney(Double discountMoney) {
		this.discountMoney = discountMoney;
	}

	public String getDiscountReason() {
		return discountReason;
	}

	public void setDiscountReason(String discountReason) {
		this.discountReason = discountReason;
	}

	public Integer getLend() {
		return lend;
	}

	public void setLend(Integer lend) {
		this.lend = lend;
	}

	@Override
	public String toString() {
		return "ShouKuanEntity [shoukuanId=" + shoukuanId + ", student=" + student + ", shoukuaninfoId="
				+ shoukuaninfoId + ", classId=" + classId + ", imagesId=" + imagesId + ", shouKuanName=" + shouKuanName
				+ ", shouKuanMoney=" + shouKuanMoney + ", shouKuanPay=" + shouKuanPay + ", discountMoney="
				+ discountMoney + ", discountReason=" + discountReason + ", lend=" + lend + "]";
	}

	

}
